<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .userSelectImg{
            position: relative;
            margin-right: 9px;
            margin-bottom: 9px;
            width: 77px;
            height: 77px;
            border: 1px solid #d9d9d9;
            margin: 15px;
        }
        #fileName{
            position: absolute;
            z-index: 1;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
        }
        .userSelectImg::after{
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            width: 2px;
            height: 39.5px;
            background: #666;
        }
        .userSelectImg::before{
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            height: 2px;
            width: 39.5px;
            background: #666;
        }
        #uploadBtn{
            display: inline-block;
            margin: 10px auto;
            padding: 10px;
            background: green;
            color: #fff;
            cursor: pointer;
        }
        #uploadBtn:active{
            background: #00800054;
        }
    </style>
</head>

<body>
    <form action="" method="POST" enctype="multipart/form-data" id="uploadData">
        名字：<input type="text" name="name"><br>
        电话：<input type="text" name="phone">
        <div class="userSelectImg">
            <input type="file" multiple id="fileName">
        </div>
    </form>

    <div id="showBox">
        <img src="" alt="">
    </div>
    <div id="uploadBtn">确定</div>
</body>
<script src="./jquery/1.9.1/jquery.js"></script>
<script src="./upload.js"></script>
<script>
    $('#fileName').ajaxUpLoad({
        url:"http://localhost:8280/customerInfo/submitSuccess", // 地址
        imgBox: "showBox", // 图片显示的盒子
        submitBtn: "uploadBtn", // 提交按钮
        uploadForm:"uploadData",
        data: 'file', // 参数
        num: 3 // 上传图片限制
    })
</script>

</html>